﻿namespace Rage.Base.Abilities
{
    using System;
    using System.Collections.Generic;
    using System.Text.RegularExpressions;

    public partial class CollectedCharacter
    {
        public CollectedCharacter() { }
        //
        public Character Char { get; set; }
        public virtual Rotation Rotation { get; set; }
        public virtual ICalculationOptionBase CalcOpts { get; set; }
        //
        public CombatFactors _combatFactors;
        public BossOptions _bossOpts;
        public TalentsBase _talents;
        //
        public virtual CombatFactors CombatFactors { get { return _combatFactors ?? (_combatFactors = new CombatFactors()); } set { _combatFactors = value; } }
        public BossOptions BossOpts { get { return _bossOpts ?? (_bossOpts = new BossOptions()); } set { _bossOpts = value; } }
        public virtual Stats StatS { get { return CombatFactors.StatS; } set { CombatFactors.StatS = value; } }
        public virtual TalentsBase Talents { get { return _talents; } set { _talents = value; } }
        // Equality overrides
        public override int GetHashCode()
        {
            return base.GetHashCode();
        }
        public override bool Equals(object obj)
        {
            if (!(obj is CollectedCharacter))
                return false;

            return Equals((CollectedCharacter)obj);
        }
        public bool Equals(CollectedCharacter other)
        {
            if (Char != other.Char)
                return false;
            if (Rotation != other.Rotation)
                return false;
            if (CombatFactors != other.CombatFactors)
                return false;
            if (CalcOpts != other.CalcOpts)
                return false;
            if (BossOpts != other.BossOpts)
                return false;
            if (Talents != other.Talents)
                return false;

            return true;
        }
        public static bool operator ==(CollectedCharacter c1, CollectedCharacter c2)
        {
            return c1.Equals(c2);
        }
        public static bool operator !=(CollectedCharacter c1, CollectedCharacter c2)
        {
            return !c1.Equals(c2);
        }
    }
}
